package HibernateUtilsforBM;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
/**
 * 用作junit测试
 * @author MacBook
 *
 */
public class forTestPool {
	private static SessionFactory factory;
	static{
		Configuration cfg= new Configuration().configure();
		factory = cfg.buildSessionFactory();
	}
	public static Session getSession(){
		return factory.openSession();
	}
}
